package org.luxor.commons.websocket.component.protocol;

import org.luxor.commons.core.utils.Jackson2Utils;

/**
 * 群发指令
 *
 * @author Mr.yan  @date 2021/9/4
 */
public class SendAllCommand extends AbstractCommand {

    private String command;
    private String message;


    public SendAllCommand() {
        // An empty constructor
    }

    public SendAllCommand(String message) {
        this.command = SEND_ALL_COMMAND;
        this.message = message;
    }

    @Override
    public String getCommand() {
        return command;
    }

    public void setCommand(String command) {
        this.command = command;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    @Override
    public String toJson() {
        return Jackson2Utils.toJson(this);
    }
}
